<?php
include_once '../db_conecta_adodb.inc.php';
include_once '../function.inc.php';
$rs=sql("SELECT * FROM u172676809_fcac.T_BOOKS WHERE DT_CHECK_IN>=DATE_FORMAT(CURDATE(), '%Y-%m-01') ORDER BY DT_CHECK_IN","");
$fechas=array();
while ($row=siguiente($rs)){
	for($i=$row->DT_CHECK_IN;$i<=$row->DT_CHECK_OUT;$i = date("Y-m-d", strtotime($i ."+ 1 days"))){
		//var_dump($row->DT_DATE);
		array_push($fechas, $i);
	}
}
//var_dump($fechas);

echo json_encode($fechas);